﻿#ifndef SIGNALFACTORY_H
#define SIGNALFACTORY_H

#include <QObject>
#include <memory>
#include <mutex>
#include <array>

class SignalFactory : public QObject
{
    Q_OBJECT
public:
    explicit SignalFactory(QObject *parent = nullptr);
    SignalFactory & operator =(const SignalFactory &) = delete;
    SignalFactory(SignalFactory &) = delete;
    int m_PointNum;                     //轨迹点个数
    int m_pointNum1;
    double m_PointArray[10000][3];	//轨迹点缓存数组
    double locateX[10000];
    double locateY[10000];
    bool isEnd = false;
    ~SignalFactory(){}
signals:
    void StartPlan(double sx, double sy, double ex, double ey);
    void PlanSuccessInfo();
    void PlanFailInfo();

public slots:

private:
    static std::mutex mutex_;
    static std::shared_ptr<SignalFactory> instance_;

public:
    static std::shared_ptr<SignalFactory>& SignalInstance();
};

#endif // SIGNALFACTORY_H
